package com.atguigu.gmall.feign.search;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.search.Goods;
import com.atguigu.gmall.search.vo.SearchParamVo;
import com.atguigu.gmall.search.vo.SearchRespVo;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.web.bind.annotation.*;

@RequestMapping("/api/inner/rpc/search")
@FeignClient("service-search")
public interface SearchFeignClient {
    /**
     * 上架
     */
    @PostMapping("/up/goods")
     Result up(@RequestBody Goods good);

    /**
     * 下架
     * @param skuId
     * @return
     */
    @GetMapping("/down/{skuId}")
     Result down(@PathVariable("skuId") Long skuId);

    /**
     * 检索
     * @param searchParamVo
     * @return
     */
    @PostMapping("/searchGoods")
     Result<SearchRespVo> search(@RequestBody SearchParamVo searchParamVo);


}
